<?php
class AML_View_Helper_JToolBar extends Zend_Controller_Action_Helper_Abstract
{
    public function JToolBar($component,$curaction,$itemid)
    {?>
   <div id="toolbar-box">
	<div class="m">
	<div id="toolbar" class="toolbar-list">
    <?php if(in_array($curaction,array('index'))){?>
    
            <ul>
            <li id="toolbar-new" class="button">
            <a class="toolbar" onclick="submitbutton('<?php echo $component ?>.add')" href="#">
            <span class="icon-32-new">
            </span>
            New
            </a>
            </li>

            <li id="toolbar-edit" class="button">
            <a class="toolbar" onclick="if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list');}else{ submitbutton('<?php echo $component ?>.edit')}" href="#">
            <span class="icon-32-edit">
            </span>
            Edit
            </a>
            </li>

            <li class="divider">
            </li>

            <li id="toolbar-publish" class="button">
            <a class="toolbar" onclick="if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list');}else{ submitbutton('<?php echo $component ?>.publish')}" href="#">
            <span class="icon-32-publish">
            </span>
            Publish
            </a>
            </li>

            <li id="toolbar-unpublish" class="button">
            <a class="toolbar" onclick="if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list');}else{ submitbutton('<?php echo $component ?>.unpublish')}" href="#">
            <span class="icon-32-unpublish">
            </span>
            Unpublish
            </a>
            </li>



            <li class="divider">
            </li>
          <?php } ?>


            <li id="toolbar-trash" class="button">
            <a class="toolbar" onclick="if (document.adminForm.boxchecked.value==0){alert('Please first make a selection from the list');}else{ submitbutton('<?php echo $component ?>.trash')}" href="#">
            <span class="icon-32-trash">
            </span>
            Trash
            </a>
            </li>

            <li class="divider">
            </li>



            <li class="divider">
            </li>



            

        <?php if(in_array($curaction,array('edit','doedit','add','doadd'))){?>

               <li id="toolbar-apply" class="button">
                <a class="toolbar" onclick="submitbutton('blog.apply')" href="#">
                <span class="icon-32-apply">
                </span>
                Save
                </a>
                </li>

                <li id="toolbar-save" class="button">
                <a class="toolbar" onclick="submitbutton('blog.save')" href="#">
                <span class="icon-32-save">
                </span>
                Save &amp; Close
                </a>
                </li>

                <li id="toolbar-save-new" class="button">
                <a class="toolbar" onclick="submitbutton('blog.save2new')" href="#">
                <span class="icon-32-save-new">
                </span>
                Save &amp; New
                </a>
                </li>


                <li id="toolbar-cancel" class="button">
                <a class="toolbar" onclick="submitbutton('blog.cancel')" href="#">
                <span class="icon-32-cancel">
                </span>
                Close
                </a>
                </li>

                <li class="divider">
                </li>


     <?php }?>

 </ul>
            <div class="clr"></div>
            </div>
            <div class="pagetitle icon-48-blog"><h2><?php echo $component ?> Manager</h2></div>
            </div>
            </div>

  <?php  } 
}
?>